package com.fjec.market.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fjec.common.protocol.JsonResult;
import com.fjec.market.entity.InfoBusiness;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 005.商户表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-09-07
 */
public interface IInfoBusinessService extends IService<InfoBusiness> {
    List<InfoBusiness> getBusinessByMarkIdAndBusiType(Integer markCode, int busiType, Page page);

    List<InfoBusiness> getBusinessesByBusinessIdsAndMarkCode(int markCode, List<Long> businessIds, int busiType, Page page);

    Map<String, Object> getBusinessByUserId(Long userId);

    JsonResult saveBusiness(InfoBusiness business, String markCodes, Long picId, Object verifyCode);

    Map<String, Object> getDepoStatus(Long userId);

    /**
     * 查询保证金信息
     *
     * @return
     */
    JsonResult getDepositInfo();

    List<InfoBusiness> getBusinessByShopNumAndMarkCode(int markCode, Long shopNum, int busiType);

    /**
     * 获取需要生成shopNum的分拣、农资、包装列表
     *
     * @param limit
     * @param minutes
     * @return
     */
    List<Map<String, Object>> getBusinessForShopNumGen(Integer limit, Integer minutes);

    Page getBusinessesOfAllTypesByConditions(Integer searchBy, String title, Integer busiType, Integer markCode, String startTime, String endTime, Page page);

    List<Long> getUserIdByBusiNameES(String title);

    List<Map<String, Object>> getBusiNamesByBusiIdOrUserIds(List<Long> busiIdOrUserIds);

    Long getUserIdByBusiIdBusiType(Long busiId, Integer busiType);
}
